<template>
    <div class="cont">
        <div class="text-2xl">积分设置</div>
        <CustomForm :form-list="formColumns" @submit="onsubmit"></CustomForm>
    </div>
</template>

<script setup lang="ts">
import CustomForm from '@/components/customForm/CustomForm.vue';
import { CustomFormItem, CustomFormState } from '@/components/customForm/types';

const formColumns = reactive<CustomFormItem[]>([
    {label: '积分折扣比例',key: 'pointsDiscountRatio',type: 'input',help:'输入1000 则表示1000积分可抵扣1元, 输入100表示100积分可抵扣1元'},
    { value: '提交并保存', key: 'submit', type: 'submit' }
])

const onsubmit = (formState: CustomFormState) => {
    alert(JSON.stringify(formState))
}
</script>

<style scoped>
</style>